﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;

namespace FetchDataCompare
{
	internal class GeoPipeStruct : GeoObjectStructBase, IGeoObjectStruct
	{
		public GeoPipeStruct(Element element, Autodesk.Revit.DB.View view) : base(element, view)
		{
			base.Attribute = this.GetElementAttribute();
		}

		public GeoPipeStruct()
		{
		}

		public override string GetElementAttribute()
		{
			return base.GetElementAttribute();
		}

		public void GetExtendAttribute(ref string attr)
		{
			Pipe pipe = base.UseElement as Pipe;
			if (pipe == null)
			{
				attr = (attr ?? "");
				return;
			}
			LocationCurve locationCurve = pipe.Location as LocationCurve;
			base.GetStartAndEndPoint(locationCurve.Curve, ref attr);
		}
	}
}
